﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WindowsForm.FormDtos
{
    /// <summary>
    /// 参数对象映射
    /// </summary>
    public class ParameterSettingsDto
    {
        /// <summary>
        /// 主键
        /// </summary>

        public long ID { get; set; }

        /// <summary>
        /// 任务名称
        /// </summary>
        public string Name { get; set; }


        /// <summary>
        /// 上传通道
        /// </summary>
        public string UploadTarget { get; set; }

        /// <summary>
        /// 上传通道类型
        /// </summary>
        public string UploadTargetType { get; set; }

        /// <summary>
        /// 数据源集合
        /// </summary>
        public string DataSourceList { get; set; }
        /// <summary>
        /// 数据表名称
        /// </summary>
        public string TableName { get; set; }

         /// <summary>
         /// 连接对象
         /// </summary>
        public string Link { get; set; }

        /// <summary>
        /// 字段集合
        /// </summary>
        public string Fields { get; set; }

        /// <summary>
        /// 条件筛选
        /// </summary>
        public string WhereEx { get; set; }
        /// <summary>
        /// 协议类型
        /// </summary>
        public string ProtocolType { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 按钮集合
        /// </summary>
        public AntdUI.CellLink[] Btns { get; set; }

    }

    /// <summary>
    ///对象映射模型
    /// </summary>
    public class AllSetDtos
    {

        /// <summary>
        /// Id主键
        /// </summary>

        public long N_Id { get; set; }


        /// <summary>
        /// 通道名称
        /// </summary>

        public string V_Name { get; set; } = string.Empty;


        /// <summary>
        /// 角色【1：接收端，2：发送端】
        /// </summary>
        public int N_Role { get; set; }

        /// <summary>
        /// 协议类型【Http  :  Socket  :  MQTT】
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string V_ProtocolType { get; set; } = string.Empty;

        /// <summary>
        /// Url地址
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Http_Url { get; set; } = string.Empty;
        /// <summary>
        /// HTTP发送模式【Post：Get】
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Http_Method { get; set; } = string.Empty;

        /// <summary>
        /// HTTP授权
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string Http_Token { get; set; } = string.Empty;

        /// <summary>
        /// TCP角色(服务器or客户端)
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string TCP_Role { get; set; } = string.Empty;

        /// <summary>
        /// IP地址
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string IP { get; set; } = string.Empty;
        /// <summary>
        /// 端口号
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public int Port { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string MQTT_UserName { get; set; } = string.Empty;
        /// <summary>
        /// 密码
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string MQTT_PassWord { get; set; } = string.Empty;

        /// <summary>
        /// MQTT主题
        /// </summary>
        [SugarColumn(IsNullable = true)]
        public string MQTT_Topics { get; set; } = string.Empty;
        /// <summary>
        /// 按钮集合
        /// </summary>
        public AntdUI.CellLink[] Btns { get; set; }
    }
}

